import request from '@/services/request'

// 获取搜索结果
export const getSearchData = async (data, options = {}) => {
  return await request.post('/v3/web/api/search', data, options)
}

// 获取首页数据
export const getPageData = async (type, options = {}) => {
  return await request.get(`/v3/web/api/home?chName=${type}`, {}, options)
}

// 获取搜索top数据
export const getTopData = async () => {
  return await request.get('/v3/web/api/getSearchOptions')
}

// 激活码兑换
export const codeConvert = async data => {
  return await request.post('/api/exchange_code',data)
}